package com.alibaba.otter.manager.web.mapstruct;

import com.alibaba.otter.manager.biz.statistics.delay.param.DelayStatInfo;
import com.alibaba.otter.manager.biz.statistics.delay.param.TopDelayStat;
import com.alibaba.otter.manager.biz.statistics.throughput.param.AnalysisType;
import com.alibaba.otter.manager.biz.statistics.throughput.param.ThroughputInfo;
import com.alibaba.otter.manager.web.dto.DelayStatInfoDTO;
import com.alibaba.otter.manager.web.dto.RecentThroughputStatDTO;
import com.alibaba.otter.manager.web.dto.TopDelayStatDTO;
import com.alibaba.otter.shared.common.model.statistics.throughput.ThroughputStat;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.MappingConstants;
import org.mapstruct.Mappings;

import java.util.List;
import java.util.Map;

@Mapper(componentModel = MappingConstants.ComponentModel.SPRING)
public interface DelayStatMapper {

    Map<Long, DelayStatInfoDTO.RecentDelayStat> toRecentDelayStat(Map<Long, DelayStatInfo> stat);

    TopDelayStatDTO toTopDelayStat(TopDelayStat stat);
    List<TopDelayStatDTO> toTopDelayStat(List<TopDelayStat> stat);
}
